Feature: Book Genie Mode - Automated Testing with Detailed Reporting
File name: BookGenie.feature
Relative path: features/BookGenie.feature
Scenario Outline: Book Genie Response Validation with Citation Verification
When
I open the Creative Workspace login page
00:00:03.591
Then
I should see the homepage
00:00:00.060
When
I click on the mode selection dropdown
00:00:00.000
Then
I can see the "BookGenieQA" mode
00:00:00.000
And
I select the "BookGenieQA" mode
00:00:00.000
Then
I type "Suggest 5 books on christmas" on chat input element
00:00:31.122
And
I wait for AI to complete thinking
00:00:20.625
And
I validate the response is visible for "Suggest 5 books on christmas"
00:00:00.007
And
I extract book data from BookGenie response
00:00:00.007
And
I save BookGenie book data to Excel file for query "Suggest 5 books on christmas"
00:00:00.000
+ Show Error
Error: No book data extracted from BookGenie response.
at CustomWorld.(anonymous) (/home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:46:15)
at /home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:8:71
at __awaiter (/home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:4:12)
at CustomWorld.(anonymous) (/home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:59:12)
And
I validate each book individually against Excel file for query "Suggest 5 books on christmas"
0s
And
I validate that reason texts match citation texts with 80% similarity
0s
And
I generate detailed citation validation report
0s
Then
I verify database connectivity
0s
And
database should contain 10032 books
0s
And
I validate extracted books individually against database
0s
And
I validate BookGenie response relevance with AI for query "Suggest 5 books on christmas"
0s
=== SCENARIO LOGS: Book Genie Response Validation with Citation Verification === [12:13:29 PM] Navigating to Creative Workspace login page [12:13:32 PM] Homepage visibility: false [12:13:32 PM] ℹ️ Typing query: "Suggest 5 books on christmas" [12:14:02 PM] ⚠ ⚠Book Genie mode did not loaded [12:14:02 PM] ℹ️ Preparing to type query: "Suggest 5 books on christmas" [12:14:02 PM] ℹ️ Waiting for chat input to be visible [12:14:02 PM] ℹ️ Clearing chat input [12:14:02 PM] ℹ️ Typing query: "Suggest 5 books on christmas" [12:14:03 PM] ℹ️ Pressing Enter to submit query [12:14:03 PM] ✅ Query submitted successfully: "Suggest 5 books on christmas" [12:14:03 PM] ℹ️ Waiting for AI to complete thinking... [12:14:03 PM] 📋 WAITING FOR AI RESPONSE [12:14:03 PM] ℹ️ Looking for AI thinking indicator... [12:14:03 PM] ℹ️ Waiting for thinking indicator to appear (max 2 minutes) [12:14:05 PM] ✅ ✓ AI thinking indicator appeared - AI is processing the request [12:14:05 PM] ℹ️ Waiting for thinking indicator to disappear (max 5 minutes) [12:14:21 PM] ✅ ✓ AI thinking completed - Response should be ready [12:14:21 PM] ℹ️ 🔍 Checking for "None of the above, just" option... [12:14:21 PM] ℹ️ ✓ "None of the above, just" option not present - proceeding normally [12:14:21 PM] ℹ️ Allowing additional time for response rendering [12:14:24 PM] ✅ AI response wait process completed [12:14:24 PM] ℹ️ Validating response for query: "Suggest 5 books on christmas" [12:14:24 PM] 📋 VALIDATING RESPONSE FOR QUERY: "Suggest 5 books on christmas" [12:14:24 PM] ℹ️ Locating the latest response in chat [12:14:24 PM] ℹ️ Waiting for response to be visible (max 30 seconds) [12:14:24 PM] ✅ Response received - Length: 92 characters [12:14:24 PM] ℹ️ Response preview: Watch Me Work✅ Request Processed🚀 Switching to BookSearchSure. Opening the BookSearch Mode.... [12:14:24 PM] ℹ️ Extracting book data from response... [12:14:24 PM] 📋 EXTRACTING BOOK DATA FROM RESPONSE [12:14:24 PM] ℹ️ Locating BookGenie response container [12:14:24 PM] ℹ️ Extracting HTML content from response [12:14:24 PM] ℹ️ HTML content extracted - Length: 5825 characters [12:14:24 PM] ℹ️ Parsing HTML to extract book data [12:14:24 PM] ✅ SUCCESSFULLY EXTRACTED 0 BOOKS [12:14:24 PM] 📋 EXTRACTED BOOKS SUMMARY [12:14:24 PM] 📊 Total books extracted: 0 [12:14:24 PM] 📊 Average relevance score: 0% [12:14:24 PM] ✅ Extracted 0 books from response === END LOGS ===
Scenario Logs: Book Genie Response Validation with Citation Verification
[12:13:29 PM] Navigating to Creative Workspace login page
[12:13:32 PM] Homepage visibility: false
[12:13:32 PM] ℹ️ Typing query: "Suggest 5 books on christmas"
[12:14:02 PM] ⚠ ⚠Book Genie mode did not loaded
[12:14:02 PM] ℹ️ Preparing to type query: "Suggest 5 books on christmas"
[12:14:02 PM] ℹ️ Waiting for chat input to be visible
[12:14:02 PM] ℹ️ Clearing chat input
[12:14:02 PM] ℹ️ Typing query: "Suggest 5 books on christmas"
[12:14:03 PM] ℹ️ Pressing Enter to submit query
[12:14:03 PM] ✅ Query submitted successfully: "Suggest 5 books on christmas"
[12:14:03 PM] ℹ️ Waiting for AI to complete thinking...
[12:14:03 PM] 📋 WAITING FOR AI RESPONSE
[12:14:03 PM] ℹ️ Looking for AI thinking indicator...
[12:14:03 PM] ℹ️ Waiting for thinking indicator to appear (max 2 minutes)
[12:14:05 PM] ✅ ✓ AI thinking indicator appeared - AI is processing the request
[12:14:05 PM] ℹ️ Waiting for thinking indicator to disappear (max 5 minutes)
[12:14:21 PM] ✅ ✓ AI thinking completed - Response should be ready
[12:14:21 PM] ℹ️ 🔍 Checking for "None of the above, just" option...
[12:14:21 PM] ℹ️ ✓ "None of the above, just" option not present - proceeding normally
[12:14:21 PM] ℹ️ Allowing additional time for response rendering
[12:14:24 PM] ✅ AI response wait process completed
[12:14:24 PM] ℹ️ Validating response for query: "Suggest 5 books on christmas"
[12:14:24 PM] 📋 VALIDATING RESPONSE FOR QUERY: "Suggest 5 books on christmas"
[12:14:24 PM] ℹ️ Locating the latest response in chat
[12:14:24 PM] ℹ️ Waiting for response to be visible (max 30 seconds)
[12:14:24 PM] ✅ Response received - Length: 92 characters
[12:14:24 PM] ℹ️ Response preview: Watch Me Work✅ Request Processed🚀 Switching to BookSearchSure. Opening the BookSearch Mode....
[12:14:24 PM] ℹ️ Extracting book data from response...
[12:14:24 PM] 📋 EXTRACTING BOOK DATA FROM RESPONSE
[12:14:24 PM] ℹ️ Locating BookGenie response container
[12:14:24 PM] ℹ️ Extracting HTML content from response
[12:14:24 PM] ℹ️ HTML content extracted - Length: 5825 characters
[12:14:24 PM] ℹ️ Parsing HTML to extract book data
[12:14:24 PM] ✅ SUCCESSFULLY EXTRACTED 0 BOOKS
[12:14:24 PM] 📋 EXTRACTED BOOKS SUMMARY
[12:14:24 PM] 📊 Total books extracted: 0
[12:14:24 PM] 📊 Average relevance score: 0%
[12:14:24 PM] ✅ Extracted 0 books from response
Scenario Outline: Book Genie Response Validation with Citation Verification
When
I open the Creative Workspace login page
00:00:02.963
Then
I should see the homepage
00:00:00.035
When
I click on the mode selection dropdown
00:00:00.000
Then
I can see the "BookGenieQA" mode
00:00:00.000
And
I select the "BookGenieQA" mode
00:00:00.000
Then
I type "Suggest 3 books for childrens" on chat input element
00:00:31.084
And
I wait for AI to complete thinking
00:00:27.216
And
I validate the response is visible for "Suggest 3 books for childrens"
00:00:00.007
And
I extract book data from BookGenie response
00:00:00.006
And
I save BookGenie book data to Excel file for query "Suggest 3 books for childrens"
00:00:00.000
+ Show Error
Error: No book data extracted from BookGenie response.
at CustomWorld.(anonymous) (/home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:46:15)
at /home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:8:71
at __awaiter (/home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:4:12)
at CustomWorld.(anonymous) (/home/runner/work/HC_Epub_Automation/HC_Epub_Automation/tests/steps/bookGenie.step.ts:59:12)
And
I validate each book individually against Excel file for query "Suggest 3 books for childrens"
0s
And
I validate that reason texts match citation texts with 80% similarity
0s
And
I generate detailed citation validation report
0s
Then
I verify database connectivity
0s
And
database should contain 10032 books
0s
And
I validate extracted books individually against database
0s
And
I validate BookGenie response relevance with AI for query "Suggest 3 books for childrens"
0s
=== SCENARIO LOGS: Book Genie Response Validation with Citation Verification === [12:14:26 PM] Navigating to Creative Workspace login page [12:14:29 PM] Homepage visibility: false [12:14:29 PM] ℹ️ Typing query: "Suggest 3 books for childrens" [12:14:59 PM] ⚠ ⚠Book Genie mode did not loaded [12:14:59 PM] ℹ️ Preparing to type query: "Suggest 3 books for childrens" [12:14:59 PM] ℹ️ Waiting for chat input to be visible [12:14:59 PM] ℹ️ Clearing chat input [12:14:59 PM] ℹ️ Typing query: "Suggest 3 books for childrens" [12:15:00 PM] ℹ️ Pressing Enter to submit query [12:15:00 PM] ✅ Query submitted successfully: "Suggest 3 books for childrens" [12:15:00 PM] ℹ️ Waiting for AI to complete thinking... [12:15:00 PM] 📋 WAITING FOR AI RESPONSE [12:15:00 PM] ℹ️ Looking for AI thinking indicator... [12:15:00 PM] ℹ️ Waiting for thinking indicator to appear (max 2 minutes) [12:15:02 PM] ✅ ✓ AI thinking indicator appeared - AI is processing the request [12:15:02 PM] ℹ️ Waiting for thinking indicator to disappear (max 5 minutes) [12:15:24 PM] ✅ ✓ AI thinking completed - Response should be ready [12:15:24 PM] ℹ️ 🔍 Checking for "None of the above, just" option... [12:15:24 PM] ℹ️ ✓ "None of the above, just" option not present - proceeding normally [12:15:24 PM] ℹ️ Allowing additional time for response rendering [12:15:27 PM] ✅ AI response wait process completed [12:15:27 PM] ℹ️ Validating response for query: "Suggest 3 books for childrens" [12:15:27 PM] 📋 VALIDATING RESPONSE FOR QUERY: "Suggest 3 books for childrens" [12:15:27 PM] ℹ️ Locating the latest response in chat [12:15:27 PM] ℹ️ Waiting for response to be visible (max 30 seconds) [12:15:27 PM] ✅ Response received - Length: 92 characters [12:15:27 PM] ℹ️ Response preview: Watch Me Work✅ Request Processed🚀 Switching to BookSearchSure. Opening the BookSearch Mode.... [12:15:27 PM] ℹ️ Extracting book data from response... [12:15:27 PM] 📋 EXTRACTING BOOK DATA FROM RESPONSE [12:15:27 PM] ℹ️ Locating BookGenie response container [12:15:27 PM] ℹ️ Extracting HTML content from response [12:15:27 PM] ℹ️ HTML content extracted - Length: 5825 characters [12:15:27 PM] ℹ️ Parsing HTML to extract book data [12:15:27 PM] ✅ SUCCESSFULLY EXTRACTED 0 BOOKS [12:15:27 PM] 📋 EXTRACTED BOOKS SUMMARY [12:15:27 PM] 📊 Total books extracted: 0 [12:15:27 PM] 📊 Average relevance score: 0% [12:15:27 PM] ✅ Extracted 0 books from response === END LOGS ===
Scenario Logs: Book Genie Response Validation with Citation Verification
[12:14:26 PM] Navigating to Creative Workspace login page
[12:14:29 PM] Homepage visibility: false
[12:14:29 PM] ℹ️ Typing query: "Suggest 3 books for childrens"
[12:14:59 PM] ⚠ ⚠Book Genie mode did not loaded
[12:14:59 PM] ℹ️ Preparing to type query: "Suggest 3 books for childrens"
[12:14:59 PM] ℹ️ Waiting for chat input to be visible
[12:14:59 PM] ℹ️ Clearing chat input
[12:14:59 PM] ℹ️ Typing query: "Suggest 3 books for childrens"
[12:15:00 PM] ℹ️ Pressing Enter to submit query
[12:15:00 PM] ✅ Query submitted successfully: "Suggest 3 books for childrens"
[12:15:00 PM] ℹ️ Waiting for AI to complete thinking...
[12:15:00 PM] 📋 WAITING FOR AI RESPONSE
[12:15:00 PM] ℹ️ Looking for AI thinking indicator...
[12:15:00 PM] ℹ️ Waiting for thinking indicator to appear (max 2 minutes)
[12:15:02 PM] ✅ ✓ AI thinking indicator appeared - AI is processing the request
[12:15:02 PM] ℹ️ Waiting for thinking indicator to disappear (max 5 minutes)
[12:15:24 PM] ✅ ✓ AI thinking completed - Response should be ready
[12:15:24 PM] ℹ️ 🔍 Checking for "None of the above, just" option...
[12:15:24 PM] ℹ️ ✓ "None of the above, just" option not present - proceeding normally
[12:15:24 PM] ℹ️ Allowing additional time for response rendering
[12:15:27 PM] ✅ AI response wait process completed
[12:15:27 PM] ℹ️ Validating response for query: "Suggest 3 books for childrens"
[12:15:27 PM] 📋 VALIDATING RESPONSE FOR QUERY: "Suggest 3 books for childrens"
[12:15:27 PM] ℹ️ Locating the latest response in chat
[12:15:27 PM] ℹ️ Waiting for response to be visible (max 30 seconds)
[12:15:27 PM] ✅ Response received - Length: 92 characters
[12:15:27 PM] ℹ️ Response preview: Watch Me Work✅ Request Processed🚀 Switching to BookSearchSure. Opening the BookSearch Mode....
[12:15:27 PM] ℹ️ Extracting book data from response...
[12:15:27 PM] 📋 EXTRACTING BOOK DATA FROM RESPONSE
[12:15:27 PM] ℹ️ Locating BookGenie response container
[12:15:27 PM] ℹ️ Extracting HTML content from response
[12:15:27 PM] ℹ️ HTML content extracted - Length: 5825 characters
[12:15:27 PM] ℹ️ Parsing HTML to extract book data
[12:15:27 PM] ✅ SUCCESSFULLY EXTRACTED 0 BOOKS
[12:15:27 PM] 📋 EXTRACTED BOOKS SUMMARY
[12:15:27 PM] 📊 Total books extracted: 0
[12:15:27 PM] 📊 Average relevance score: 0%
[12:15:27 PM] ✅ Extracted 0 books from response